package Thread;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: Administrator
 * \* Date: 2022/5/5
 * \* Time: 20:11
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
public enum TestEnum {
    RED,BLACK,GREEN,WHITE;

    public static void main(String[] args) {
  //      TestEnum[] testEnums = TestEnum.values();
//        for (int i =0;i<testEnums.length;i++){
//            System.out.println(testEnums[i] + " " + testEnums[i].ordinal());
//        }
//        System.out.println("======================");
//        System.out.println(TestEnum.valueOf("GREEN"));

        TestEnum testEnum = TestEnum.BLACK;
        TestEnum testEnum1 = TestEnum.RED;
        System.out.println(testEnum.compareTo(testEnum1));
        System.out.println(BLACK.compareTo(RED));
        System.out.println(RED.compareTo(BLACK));
    }
}
